import { Component } from '@angular/core';
import { Login }    from './login';
import { LoginService }    from './loginService';
import construct = Reflect.construct;
@Component({
    moduleId: module.id,
    selector: 'login-form',
    templateUrl: 'login-form.component.html',
    providers: [LoginService]
})

export class LoginFormComponent {
    constructor(private loginService:LoginService){

    }
    loginForm = new Login('111','222');
    submitted = false;
    onSubmit() {
        this.loginService.login(this.loginForm.userName,this.loginForm.password)
        this.submitted = true; }
    queryAdd(){
        this.loginService.queryAdd();
    }
}